Adding multiple byte arrays in c# [migrated]
Posted
by
James P. Wright
on Programmers
See other posts from Programmers
or by James P. Wright
Published on 2012-10-17T22:53:23Z
Indexed on
2012/10/17
23:19 UTC
Read the original article
Hit count: 242
I'm working on a legacy system that uses byte arrays for permission levels.
Example:
00 00 00 00 00 00 00 01 means they have "Full Control"
00 00 00 00 00 00 00 02 means they have "Add Control"
00 00 00 00 00 00 00 04 means they have "Delete Control"
So, if a User has "00 00 00 00 00 00 00 07" that means they have all 3 (as far as it has been explained to me).
Now, my question is that I need to know how to get to "0x07" when creating/checking records.
I don't know the syntax for actually combining 0x01, 0x02 and 0x04 so that I come out with 0x07.
© Programmers or respective owner